import React from 'react';
import { useState, useEffect } from 'react';
import { Link } from 'umi';
import { listCreativityGroup } from '@/apis/advert';
import styles from './index.less';

// 统计
function statistics() {
  const [table, settable] = useState({});

  useEffect(() => {
    console.log('styles.article: ', styles.article);
    listCreativityGroup().then((res) => {
      console.log('res>>>>>>>>>: ', res);
    });
  }, []);

  return (
    <div className={styles.article}>
      <Link
        to={{
          pathname: `/promotion`,
          state: {
            type: 'creative',
          },
        }}
      >
        <div>
          <p>待审核</p>
          <p>1</p>
        </div>
      </Link>

      <Link
        to={{
          pathname: `/promotion`,
          state: {
            type: 'creative',
          },
        }}
      >
        <div>
          <p>待投放</p>
          <p>2</p>
        </div>
      </Link>

      <Link
        to={{
          pathname: `/promotion`,
          state: {
            type: 'creative',
          },
        }}
      >
        <div>
          <p>暂停中</p>
          <p>2</p>
        </div>
      </Link>
      <Link
        to={{
          pathname: `/promotion`,
          state: {
            type: 'creative',
          },
        }}
      >
        <div>
          <p>投放中</p>
          <p>33</p>
        </div>
      </Link>
      <Link
        to={{
          pathname: `/promotion`,
          state: {
            type: 'creative',
          },
        }}
      >
        <div>
          <p>已完成</p>
          <p>4</p>
        </div>
      </Link>
      <Link
        to={{
          pathname: `/promotion`,
          state: {
            type: 'creative',
          },
        }}
      >
        <div>
          <p>审核不通过</p>
          <p>6</p>
        </div>
      </Link>
    </div>
  );
}

export default statistics;
